וַיְהִ֣י ׀ לְעֵ֣ת הָעֶ֗רֶב וַיָּ֨קָם דָּוִ֜ד מֵעַ֤ל מִשְׁכָּבוֹ֙ וַיִּתְהַלֵּךְ֙ עַל־גַּ֣ג בֵּית־הַמֶּ֔לֶךְ וַיַּ֥רְא אִשָּׁ֛ה רֹחֶ֖צֶת מֵעַ֣ל הַגָּ֑ג וְהָ֣אִשָּׁ֔ה טוֹבַ֥ת מַרְאֶ֖ה מְאֹֽד׃
Pada suatu petang, Daud bangun dari tempat tidurnya lalu berjalan-jalan di atas sotoh istana raja. Dari atas sotoh itu ia melihat seorang perempuan sedang mandi; perempuan itu sangat elok rupanya.
Or HaChaim
Let us now go back to the main subject under discussion, the Israelite's imagination as applied to matters concerning his libido. The more he thinks about this subject the more his desire becomes aroused making it harder for his רצון, will, to control his emotions, the urges rooted in his being flesh and blood. Whereas normally, one needs to concentrate on the subject of G'd's commandments in order to ensure that one fulfils them in the best way possible, in this case one must avoid even thinking about it so that one does not see the object of one's desire with one's eyes. The moment one looks upon the object in question one places one's innocence in jeopardy. We know that King David fell victim to his carnal urges as a result of looking at Bat Sheva (Samuel II 11,2) bathing on the roof of her house. Up until that moment David's heart which had been devoid of lust had not been aroused. He did what he did only as a result of what he saw with his eyes. The moment one begins to think carnal thoughts one's temptation is reinforced, and as a result this makes preoccupation with carnal thoughts appear as something natural. The wise Solomon was fully aware of this and this is why he wrote in Proverbs 1,10: "my son, if sinners entice you, do not consent." He meant that one should not engage in arguing with anyone who tries to entice one to sin. The mere fact that one argues about it already strengthens the forces of temptation. When David said in Psalms 19,9 that the precepts of G'd are clear and brilliant, he referred to the expressions דבור and אמירה respectively, i.e. that on the one hand G'd gave clear directives, i.e. like the decree of a king, דבור; on the other hand, He also phrased this commandment as אמירה, as a soft-spoken one, the kind of tone one adopts with highly placed people and He asked Moses to tell them that He is their G'd, i.e. to bestow His Holy Name on them. There is no greater tribute G'd can pay to a people.
Rashi
You have visited [upon me] at night at eventide for the iniquity of Bathsheba, concerning which it is stated (in II Sam. 11:2) “And it came to pass at the time of evening, that David arose, etc.”